import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    user:{},
    routes:[],
  },
  mutations: {
    // 设置用户
    SetUser(state,user){
      state.user = user;
      // console.log('设置用户成功');
    },
    // 设置路由
    SetRoutes(state,routes){
      state.routes = routes;
    }
  }
})
